package com.ruoyi.system.mapper;

import com.beust.jcommander.DynamicParameter;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.HolidaySetting;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 假期设置Mapper接口
 * 
 * @author wocurr.com
 */
@DataSource(value = DataSourceType.SLAVE)
public interface OaMapper {

    @Select("select * from ${tableName}")
    List<Map<String,String>> listData(@Param("tableName")String tableName);

    @Select("select * from ${tableName} where ${key} = #{val}")
    List<Map<String,String>> listDataByCondition(@Param("tableName")String tableName,
                                                 @Param("key")String key,
                                                 @Param("val")String val);
}
